VisiScript & DeVisiScript	0.1	12:53 PM 1/3/2009
+-+-+-+-+-+-+-+-+-+-+-+-+

  DeVisiScript translates global visibility blocks extracted from GoldenEye into readable english.  This text file can be editted much easier than binary editting.  The companion program VisiScript reconstructs standalone global visibility files from formatted text.  The binary can then be reinserted  into GoldenEye either manually or using the GoldenEye Setup Editor.

  Version 0.1 does not implement all known commands.  A later version will be more precise.

+_+

Usage:
DeVisiScript.exe <filename.bin> <options>
	Accepts a binary global visibility file and outputs a text file of the same name.

VisiScript.exe <filename.txt> <options>
	Accepts a text file and outputs a binary file of the same name.

  Both programs optionally accept a filename.  If one isn't cited, it will ask for one.  You can also drag-and-drop files onto the programs.  Options are the same for both files.  Options can be preceeded with either a '-' or '/' and may be either upper or lower case.
	/o<filename.ext>	optional output filename
	/h or /?		help message displaying these options

example:
DeVisiScript.exe global.bin		translates global.bin into the text file global.txt
VisiScript.exe global.txt -onew.bin	creates a global visibility file new.bin from global.txt

#_#

Rules for Visibility Files:

  The interpretter uses codewords to interpret what you should do.  Each codeword can be either upper or lower case and either singular or plural.  Whitespace is ignored as are line breaks, so you can break it up however looks nicest to you.  First, before getting into any specifics, here's a sample file that is known to work:

/*start example*/

In block 1:
	Room 0x19 is visible 
	from rooms 0x12 - 0x13, 0x16, and 0x1a - 0x23
	and through portals 0xf001044 and 0xf001148.
	Portals are not required.

/*end example*/

  At the start of each block you need to write the word 'block'.  This signifies the end of the first block and beginning of the next, and this is what the interpretter uses to divide the blocks up when writting.  The block number is optional, actually, but helps keep track of things when you're reading it.

  Writting the words 'room' or 'portal' signifies that the numerical values that follow are to be added either to the room or portal list.  If you list numbers without using either of these words, the values are ignored.

  The interpretter expects that the list of rooms being visible will be the first thing you write, mostly because that makes logical sense in the sentence.  The first time you write 'room' or 'rooms', these will be added to the list of rooms that are being made visible.  Once you write the word 'visible', all rooms you name after that are added to the list of rooms that can see the lit ones.

  Numerals can be either decimal integers, octal, hexadecimal, binary, or any other base that can be expressed with standard C string formatting.  So, room 12 in a file can be written one of these many exciting ways:
value	base
12	decimal
014	octal
0xC	hexadecimal
  To specify a range of values, such as 1 to 5, use a dash between the values, i.e. 1 - 5.
  There must be at least one space between each character for them to be recognised properly.  If you use dashes, be certain that there is a space between each number and the dash.  Otherwise, it may ignore one of the values or negate them.

  To make the room visible without the need of portals, use the catchphrase 'not required'.

You could ultra-simplify the above example and rewrite it as so, despite how silly this looks:

/*start example*/

block
room 0x19
visible room 0x12 - 0x13 0x16 0x1a - 0x23
port 0xf001044 0xf001148
not required

/*end example*/


@_@

Erratta:
  If you're having problems compiling your own text files or modified files, it may be the text editor that you are using.  Only unformatted text will work properly with VisiScript.  Both notepad and edit.com come with Windows and can be used to edit the documents without adding any extra formatting.
  If you do use write or wordpad, be sure to save in either 'text format' or 'text format - MS-DOS'.  This will omit any of the formatting that otherwise might interfere with the interpretter.

  The GoldenEye Setup Editor can both extract and insert global visibility files.  To do so, follow these steps:
1) Open a stage setup or create a new one in the File menu
2) Select 'visual editor' from the 'Edit Setup' menu
3) Once the stage loads, change the mode to 'Edit Portals/BG'.  You can use the option in the lower left of the screen or select the mode from the 'Mode'->'Switch Mode To'->'Edit Portals/BG Mode' menu option
4) right-click the visual screen and select 'Export extra visibility from bin file' to extract the visibility file, or 'Import extra visibility from bin file' to load your new file.

  This version of DeVisiScript and VisiScript does not accept all the known commands.  In particular, only 14, 1E, 1F, 20 and 21 commands are fully implemented.  Refer to this list to determine which commands are processed:
00	fully implemented
01	not implemented
02	not implemented
03	not implemented
04	not implemented
05	not implemented
06	not implemented
14	fully implemented
1E	fully implemented
1F	fully implemented
20	fully implemented
21	fully implemented
22	partial: standalone command not implemented
23	not implemented
24	not implemented
25	not implemented
26	not implemented
27	not implemented
50	not implemented
51	not implemented
52	not implemented
5A	partial: standalone command not implemented
5B	not implemented
5C	partial: standalone command not implemented
  It is planned to fully implement all types in a further revision of the programs.

^_^

-Zoinkity
nefariousdogooder@yahoo.com
